package be.bonamis.umpire.ui.client.places;

import java.util.Date;
import java.util.Set;

import be.bonamis.projects.umpire.business.dto.UmpireDTO;

import com.google.gwt.place.shared.Place;
import com.google.gwt.place.shared.PlaceTokenizer;

public class DispoPlace extends Place {

	private String name;
	private UmpireDTO umpire;
	private Set<Date> months;

	public static class Tokenizer implements PlaceTokenizer<DispoPlace> {

		@Override
		public DispoPlace getPlace(String token) {
			return new DispoPlace(token, null, null);
		}

		@Override
		public String getToken(DispoPlace place) {
			return place.getName();
		}

	}

	public DispoPlace(String token, UmpireDTO uDto, Set<Date> set) {
		this.name = token;
		this.umpire = uDto;
		this.months = set;
	}

	public String getName() {
		return name;
	}

	public UmpireDTO getUmpire() {
		return umpire;
	}

	public Set<Date> getMonths() {
		return months;
	}
}
